package com.wx.rpc.client.core;

import java.util.List;
import java.util.Random;

/**
 * @author wx
 * @Description: 随机获取服务策略
 * @date 2019/3/9 000915:02
 */
public class RandomLoadBalanceService implements ILoadBanlanceService{
    @Override
    public String doSelect(List<String> selectNodes) {
        Random random = new Random();
        int indexSelect = random.nextInt(selectNodes.size());
        return selectNodes.get(indexSelect);
    }
}
